import os
import time
import redis


if __name__ == '__main__':
    r = redis.Redis(db=0)

    while True:
        os.system('clear')

        print('keyboard input       \t %s' % r.get('keyboard_input').decode("utf-8"))
        print('camera_1_command     \t %s' % r.get('camera_1_command').decode("utf-8"))
        print('post_detect_command  \t %s' % r.get('post_detect_command').decode("utf-8"))
        print('radar_1              \t %s' % r.get('radar_1').decode("utf-8"))
        print('radar_2              \t %s' % r.get('radar_2').decode("utf-8"))
        print('radar_3              \t %s' % r.get('radar_3').decode("utf-8"))
        print('radar_4              \t %s' % r.get('radar_4').decode("utf-8"))
        print('auto                 \t %s' % r.get('auto').decode("utf-8"))
        print('job_index            \t %s' % r.get('job_index').decode("utf-8"))
        print('radar_1_distance     \t %s' % r.get('radar_1_distance').decode("utf-8"))
        print('radar_2_distance     \t %s' % r.get('radar_2_distance').decode("utf-8"))
        print('forward_left_speed   \t %s' % r.get('forward_left_speed').decode("utf-8"))
        print('forward_right_speed  \t %s' % r.get('forward_right_speed').decode("utf-8"))
        print('cumulative_distance  \t %s' % r.get('cumulative_distance').decode("utf-8"))
        print('oy                   \t %s' % r.get('oy').decode("utf-8"))

        print('lat                  \t %s' % r.get('lat').decode("utf-8"))
        print('lon                  \t %s' % r.get('lon').decode("utf-8"))
        print('hAcc                 \t %s' % r.get('hAcc').decode("utf-8"))
        print('joystick_degrees     \t %s' % r.get('joystick_degrees').decode("utf-8"))
        print('joystick_distance    \t %s' % r.get('joystick_distance').decode("utf-8"))
        print('user_move_timestamp  \t %s' % r.get('user_move_timestamp').decode("utf-8"))

        time.sleep(1)





